package com.yunyao.framework.service;

import com.yunyao.common.dto.excel.ReconciliationExcelDto;
import com.yunyao.common.dto.project.HistoryQtDto;
import com.yunyao.common.dto.project.ProjectSettlementDto;
import com.yunyao.common.web.util.PageResult;
import com.yunyao.common.web.util.YResult;
import com.yunyao.common.dto.ReconciliationDto;
import com.yunyao.framework.dto.project.ProjectSettlementConfirmDto;
import com.yunyao.framework.dto.reconciliation.ReconciliationApprovalDto;
import com.yunyao.framework.dto.reconciliation.ReconciliationConfirmDto;
import com.yunyao.framework.dto.reconciliation.ReconciliationSaveDto;
import com.yunyao.framework.dto.reconciliation.ReconciliationSubmitApprovalDto;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationApprovalDto;
import com.yunyao.framework.dto.spreconciliatioin.SpReconciliationSaveDto;
import com.yunyao.framework.vo.project.ProjectSettlementInfoVO;
import com.yunyao.framework.vo.reconciliation.ReconciliationVO;
import com.yunyao.framework.vo.reconciliation.ReconciliationinfoVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.List;

/**
 * 项目对账
 * */
public interface ReconciliationService {
    /**
     * 获取项目对账列表
     * @param reconciliationDto
     * @return
     * */
    YResult<PageResult<ReconciliationVO>> pageList(ReconciliationDto reconciliationDto);

    BigDecimal getHistoryPrice(@NotBlank String contractId);


    /**
     * 获取历史对账含税总额
     *
     * @param dto
     * @return
     */
    BigDecimal getTaxTotalPrice(HistoryQtDto dto);
    /**
     * 根据Id获取项目对账信息
     * @param id
     * @return
     * */
    YResult<ReconciliationinfoVO> getReconliationById(Long id);

    YResult<ReconciliationinfoVO> getInfo(ReconciliationDto reconciliationDto);
    /**
     * 保存项目对账列表信息
     * @param saveDto
     * @return
     * */
    YResult<String> saveInfo(ReconciliationSaveDto saveDto);
    YResult<String> save(ReconciliationSaveDto ReconciliationSaveDto);

    YResult<Boolean> deleteInfo(ReconciliationSaveDto reconciliationDto);
    /**
     * 提交审批
     *
     * @param approvalDto
     * @return
     */
    YResult<String> submitApproval(ReconciliationSubmitApprovalDto approvalDto);

    /**
     * 审批
     * @param approvalDto
     * @return
     */
    YResult<String> approval(ReconciliationApprovalDto approvalDto);

    YResult<String> confirm(ReconciliationConfirmDto reconciliationConfirmDto);
    YResult<String> check(ReconciliationConfirmDto reconciliationConfirmDto);
    YResult<String> ycconfirm(ReconciliationConfirmDto reconciliationConfirmDto);

    List<ReconciliationExcelDto> export(ReconciliationDto reconciliationDto);
}
